package DBLayer;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import ModelLayer.*;

public class DBProductTest {
	private DBProduct dbProdObj;
	
	@Before
	public void setUp() throws Exception {
		setDbProduct(new DBProduct());
	}
	private void setDbProduct(DBProduct dbProdObj) {
		this.dbProdObj = dbProdObj;		
	}
	
	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void testDBProduct() {
		fail("Not yet implemented");
	}

	@Test
	public void testGetAllProducts() {
		fail("Not yet implemented");
	}

	@Test
	public void testFindProduct() {
		Product prodObj = dbProdObj.findProduct(3010,false);
		if(prodObj != null)
	{
			System.out.println("hej");
			System.out.println("Product " + prodObj.getProductId()+". "+ prodObj.getCountryOfOrigin());
	}
	else{
		fail("Product not found");
	}
	}

	@Test
	public void testSearchProductPName() {
		fail("Not yet implemented");
	}

	@Test
	public void testInsertProduct() {
		fail("Not yet implemented");
	}

	@Test
	public void testUpdateProduct() {
		fail("Not yet implemented");
	}

	@Test
	public void testDelete() {
		fail("Not yet implemented");
	}

}
